﻿@inherits AdminCompontentBase
<SSimpleModal Value="_visible" ValueChanged="HandleVisibleChanged" OnDelete="HandleDel" OnSave="HandleAlarm" SaveText="@T("HandleAlarm")"
              Title="@T("HandleAlarm")" Class="full-height" HeaderClass="mr-4">
    <ChildContent>
        <SElevationTab Left TabMinWidth="112" ItemsClass="mt-6 full-height" Tabs='new List<string> { T("AlarmDetails"), T("HandleAlarm") }' Dense @bind-Tab="_tab" Class="full-height">
            <SElevationTabItem>
                <AutoHeight Overflow>
                    <AutoHeightContent>
                        <div class="mt-4">
                            <AlarmHistoryDetail AlarmHistory="_model"></AlarmHistoryDetail>
                        </div>
                    </AutoHeightContent>
                </AutoHeight>
            </SElevationTabItem>
            <SElevationTabItem>
                <AutoHeight Overflow>
                    <AutoHeightContent>
                        <HandleAlarm @ref="_handleDetail" @bind-value="_handle" AlarmRuleId="_entityId"></HandleAlarm>
                    </AutoHeightContent>
                </AutoHeight>
            </SElevationTabItem>
        </SElevationTab>
    </ChildContent>
    <SaveContent Context="save">
        @if (_tab == T("HandleAlarm"))
        {
            <SButton Class="btn-form" OnClick="save.Click">@T("HandleAlarm")</SButton>
        }
    </SaveContent>
</SSimpleModal>
